40ba6ea1a008e324f521f984d22aa74a6ec69a1b,src/main/java/com/gearservice/model/cheque/Cheque.java,Cheque,withRandomData,#,120

Before Change



        this.setWarrantyDate(SampleDataService.getRandomDate());
        this.setReadyDate(SampleDataService.getRandomDate());
        this.setReturnedToClientDate(SampleDataService.getRandomDate());

        return this;
    }

After Change



        final Boolean warrantyStatus = random.nextBoolean();
        final Boolean readyStatus = random.nextBoolean();
        final Boolean returnedToClientStatus = random.nextBoolean();

        this.setWarrantyStatus(warrantyStatus);
        this.setReadyStatus(readyStatus);
        this.setReturnedToClientStatus(returnedToClientStatus);
        this.setWithoutRepair(true);
        this.setCustomerName(SampleDataService.getRandomName());
        this.setProductName(SampleDataService.getRandomProduct());
        this.setRepairPeriod(SampleDataService.getRepairPeriod());
        this.setReceiptDate(SampleDataService.getRandomDate());
        this.setModelName(SampleDataService.getRandomModel());
        this.setSerialNumber(SampleDataService.getRandomSerialNumber());
        this.setDefect(SampleDataService.getRandomMalfunction());
        this.setSpecialNotes(SampleDataService.getRandomSpecialNotes());
        this.setRepresentativeName(SampleDataService.getRandomName());
        this.setAddress(SampleDataService.getRandomAddress());
        this.setPhoneNumber(SampleDataService.getRandomPhone());
        this.setEmail(SampleDataService.getRandomEmail());

        this.setComponents(SampleDataService.getSetConsistFrom(o -> new Component().withRandomData()));

        this.setWarrantyDate(warrantyStatus ? SampleDataService.getRandomDate() : null);
        this.setReadyDate(readyStatus ? SampleDataService.getRandomDate() : null);
        this.setReturnedToClientDate(returnedToClientStatus ? SampleDataService.getRandomDate() : null);

        return this;
    }